package com.packer.ext.libdemo.api;

import android.util.SparseArray;

import com.packer.ext.http.RetrofitManager;

public class Api {

    public static final String APP_DEFAULT_DOMAIN = "https://api.github.com";
    public static final  String APP_GANK_DOMAIN = "http://gank.io";
    public static final  String APP_DOUBAN_DOMAIN = "https://api.douban.com";

    public static final   String APP_DOMAIN_NAME = "github";
    public static final  String GANK_DOMAIN_NAME = "gank";
    public static final  String DOUBAN_DOMAIN_NAME = "douban";

    static SparseArray<ApiService> serviceHashMap=new SparseArray<>();

    private static final int KEY_API=1;

    public static void initService(){
        ApiService apiService=RetrofitManager.getInstance().getRetrofit().create(ApiService.class);
        serviceHashMap.put(KEY_API,apiService);
    }

    public static ApiService getApiService(){
        return serviceHashMap.get(KEY_API);
    }
}